/*
  
  Class representing terrain (land) in a game.

  @author Richard Kelley, Liesl Wigand

 */

#ifndef TERRAIN_H
#define TERRAIN_H

/*
 This class has been used to store terrain, may no longer be necessary for newer terrain creation.
 Keeps track of all polygons used to create the land.
 */

#include <QGLWidget>     //contains corse code required for drawing polygons
#include <QDebug>        //used to print debugging messages to QT
#include "vertex.h"      //used to store points in object

namespace blackjack {    //namespace for organization

  class Terrain {
  public:
    // the dimensions of the map
    int width;
    int height;

    int maxHeight;

    // (optional) the min and max elevations in the map.
    float minElevation;
    float maxElevation;

    // the height values in an array.
    int *data;

  public:
    std::string name;
    // create an uninitialized terrain object
    Terrain();

    // set dimensions
    void setDimensions(int w, int h);

    // set the max height
    void setMaxHeight(int h);

    /*
      Return a pointer to the height data
     */
    int *getTerrainData() { return data; }

    void setTerrainData(int *data);

    int getHeight() { return height; }
    int getWidth() { return width; }
    void drawTerrain();

  };


}



#endif // TERRAIN_H
